dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(ttorrent, 0.9)
AC_CONFIG_SRCDIR([src/main.c])
AM_CONFIG_HEADER([src/config.h])

AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION)

# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET

# Checks for libraries.

PKG_CHECK_MODULES(DEPS, gtk+-2.0 >= 2.12 glib-2.0 >= 2.14 libtorrent >= 0.13)
AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_CXXFLAGS)
AC_SUBST(DEPS_LIBS)


# Checks for header files.
AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_CHECK_HEADERS([libintl.h locale.h stdlib.h string.h sys/socket.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks for library functions.
AC_CHECK_FUNCS([memset setlocale socket])

ALL_LINGUAS="pl"
AM_GLIB_GNU_GETTEXT

GETTEXT_PACKAGE=$PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [gettext domain])

AC_CONFIG_FILES([
Makefile
src/Makefile
data/Makefile
po/Makefile.in
])
AC_OUTPUT
